package com.itheima.static_case.Demo6;

public class Cat extends Animal {
    public String color;


    public void print() {
        System.out.println("这是猫，name: " + this.getName() + " 颜色：" + this.getColor());
    }

    public Cat() {
    }

    public Cat(String color) {
        this.color = color;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public static class Demo6 {
        public static void main(String[] args) {
            // 案例6 - 继承的好处
        }
    }
}
